<?php
$fileToDelete = $_POST['file_name'];

$filePath = __DIR__ . '/' . $fileToDelete;

if (file_exists($filePath)) {
    unlink($filePath);
    
    echo "File deleted successfully.";
} else {
    echo "File does not exist.";
}
?>
